package day8.race;

/**
 * @author oldliu
 * @since 1.0
 */
public class Race {
    private String name;
    private int miles;
    private int index=1;

    public Race(String name, int miles) {
        this.name = name;
        this.miles = miles;
    }
    public void inc(){
        index++;
    }
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getMiles() {
        return miles;
    }

    public void setMiles(int miles) {
        this.miles = miles;
    }

    public int getIndex() {
        return index;
    }

    public void setIndex(int index) {
        this.index = index;
    }
}
